import request from "@/utils/request";
/*****************  岗位管理  *******************/
// 列表
export function postList(params) {
  return request({
    url: "/post",
    headers: {
      isToken: false,
    },
    method: "get",
    params,
  });
}
// 新增
export function postAdd(params) {
  return request({
    url: "/post/add",
    headers: {
      isToken: false,
    },
    method: "post",
    data: params,
  });
}
// 修改
export function postEdit(id: number, params) {
  return request({
    url: `/post/${id}`,
    headers: {
      isToken: false,
    },
    method: "patch",
    data: params,
  });
}
// 删除
export function postDel(params) {
  return request({
    url: `/post/delete`,
    headers: {
      isToken: false,
    },
    method: "post",
    data: params
  });
}
// 详情
export function postInfo(id) {
  return request({
    url: `/post/${id}`,
    headers: {
      isToken: false,
    },
    method: "get",
  });
}

// 导出
export function postExport() {
  return request({
    url: `/post/excel`,
    headers: {
      isToken: false,
    },
    method: "post",
    responseType: "blob",
  });
}